#include <iostream>
using namespace std;

const int &MAX = 2000001;
const int &VMAX = 10000;

int main() {
    unsigned short *A, *B;
    int C[VMAX + 1];
    int n, i, j;
    cin >> n;
    // 开辟数组
    A = new unsigned short(sizeof(short) * n + 1);
    B = new unsigned short(sizeof(short) * n + 1);

    for (i = 0; i <= VMAX; ++i) C[i] = 0;
    for (i = 0; i < n; ++i) {
        cin >> A[i + 1];
        C[A[i + 1]]++;      // 计数
    }

    for (i = 1; i <= VMAX; ++i) C[i] += C[i - 1];
    for (j = 1; j <= n; ++j) {
        B[C[A[j]]] = A[j];  // 用计数当角标填入
        --C[A[j]];          // 填入数据，修正计数
    }
    // 打印
    for (i = 1; i <= n; ++i) {
        if (i > 1) cout << " ";
        cout << B[i];
    }
    cout << endl;
    delete A;
    delete B;
    return 0;
}